<template>
    <div>
        <cu-navbar>
            <block slot="content">杜康酒</block>
        </cu-navbar>
        <view class="content-page page">
            <div class="title">{{ detail.title }}</div>
            <div class="date">{{ detail.create_time }}</div>
            <image :src="detail.url" style="width: 100%;margin-bottom: 10px;"></image>
            <u-parse :content="detail.content"></u-parse>
        </view>
    </div>
</template>

<script>
	export default {
		data() {
			return {
				detail: {	}
			}
		},
		onLoad(options) {
				// 杜康动态
				this.$api.home(1).then(res => {
					const list = res.result.painters.map(el => {
						return {
							title: el.title,
							url: el.pic,
							...el,
							create_time: this.$common.timeToDate(el.create_time * 1000)
						}
					})
					this.detail = list.find(el => el.id == options.id) || {}
				})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
.content-page {
	padding: 15px 20px;
	.title {
		font-size: 17px;
		    font-weight: 400;
		    color: #333;

	}
	.date {
		margin-top: 5px;
		    font-size: 12px;
		    font-weight: 200;
		    color: #888;
			margin-bottom: 10px;
	}
}
</style>
